package net.csdn.business.common.feign.search.config;

import feign.Logger;
import feign.codec.ErrorDecoder;
import net.csdn.business.common.feign.config.SystemFeignErrorDecoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @ClassName SearchFeignConfiguration
 * @Description 搜索服务调用配置类
 * @Author zhangyl
 * @Date 2024/4/26 14:00
 */
@Configuration
public class SearchFeignConfiguration {
    @Bean
    @Profile(value = {"dev", "test", "pre"})
    public Logger.Level logLevel() {
        return Logger.Level.FULL;
    }

    @Bean
    public ErrorDecoder decoder() {
        return new SystemFeignErrorDecoder();
    }
}